<!-- 意见反馈 -->
<template>
	<view>
		
		<!-- 问题列表 -->
		<view class="question_list">
			<!-- 每条内容 -->
			<view class="" v-for="item in hot_list" @click="goFeedbackDetail(item)">
				<view class="item">
					<view class="content">
						{{item.content}}
					</view>
					<image src="../../../static/me/jaintou.png" style="width: 14rpx;height: 30rpx;" mode=""></image>
				</view>
				<u-line length="700rpx" margin="24rpx 28rpx"></u-line>
			</view>
		</view>
		
		<!-- 底部区域 -->
		<view class="bottom_view">
			<view class="bottom_item" style="">
				<image :src="require('./img/tjfk.png')" mode="" @click="goAddFeedback()"></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				hot_list:[
					{
						content:''
					}
				],//热门问题列表
				
				urls2: [
				    'https://cdn.uviewui.com/uview/album/1.jpg',
				    'https://cdn.uviewui.com/uview/album/2.jpg',
				    'https://cdn.uviewui.com/uview/album/3.jpg',
				    'https://cdn.uviewui.com/uview/album/4.jpg',
				    'https://cdn.uviewui.com/uview/album/5.jpg',
				    'https://cdn.uviewui.com/uview/album/6.jpg',
				    'https://cdn.uviewui.com/uview/album/7.jpg',
				    'https://cdn.uviewui.com/uview/album/8.jpg',
				    'https://cdn.uviewui.com/uview/album/9.jpg',
				    'https://cdn.uviewui.com/uview/album/10.jpg',
				],
			}
		},
		onLoad() {
			this.token = uni.getStorageSync('btlh_process_token') || '';
			this.member_id = uni.getStorageSync('btlh_process_member_id') || '';
			this.company_id = uni.getStorageSync('bthl_process_LoginCompanyId') || '';
			this.getFeedList();
		},
		onPullDownRefresh() {
			this.getFeedList();
		},
		methods: {
			
			// 前往详情页
			goFeedbackDetail(item){
				let arr = encodeURIComponent(JSON.stringify(item.annex_json))
				uni.navigateTo({
					url:'FeedBackDetail?content=' +item.content +'&phone='+item.phone + '&annex_json=' + arr,
				})
			},
			// 前往添加反馈
			goAddFeedback(){
				uni.navigateTo({
					url:'submitFeedback'
				})
			},
			// 获取热门问题
			async getFeedList(){
				const {
					data: res
				} = await this.$myRequest({
					url: 'Help/problem_list',
					method: 'POST',
					data: {
						member_id: this.member_id,
						token: this.token,
						company_id: this.company_id,
						type: '2',
					}
				});
				
				this.hot_list = res.datas.listInfo;
			},
		}
	}
</script>

<style lang="scss" scoped>
	// 底部区域
	.bottom_view{
		width: 100%;
		height: 150rpx;
		border-top: 1rpx solid #d6d7d9;
		position: fixed;
		bottom: 0;
		z-index: 1200;
		background-color: #FFFFFF;
		display: flex;
		flex-direction: row;
		justify-content: center;
		.bottom_item{
			height: 45rpx;
			margin-top: 20rpx;
		}
		image{
			width: 140rpx;
			height: 48rpx;
		}
	}
	// 问题列表
	.question_list{
		margin-bottom: 250rpx;
		.item{
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			align-items: center;
			width: 700rpx;
			margin-left: 28rpx;
			margin-top: 26rpx;
		}
		.content{
			font-size: 28rpx;
			font-family:PingFang SC;
			font-weight: normal;
			color: #333333;
		}
	}
	
	// 小标题
	.title{
		display: flex;
		flex-direction: row;
		align-items: center;
		margin-top: 20rpx;
		margin-left: 28rpx;
		.dian{
			width: 8rpx;
			height: 8rpx;
			border-radius: 50%;
			background: #666666;
		}
		.title_text{
			font-size: 26rpx;
			font-family:PingFang SC;
			font-weight: normal;
			color: #666666;
			margin-left: 10rpx;
		}
	}

</style>
